<div>
  <form class="form-horizontal" role="form" novalidate name="myForm" ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:190px;" ng-class="{true: 'shou'}[!flag.state]">
        <div>
          <label>时间</label>
          <md-input-container flex>
            <label>开始时间</label>
            <input type="month" ng-model="sendData.startTime"  time-validate="month" end-time="sendData.endTime" required
                   name="startDate">
            <div ng-messages="myForm.startDate.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <md-input-container flex>
            <label>结束时间</label>
            <input type="month" ng-model="sendData.endTime"  time-validate="month" start-time="sendData.startTime" required
                   name="endDate">
            <div ng-messages="myForm.endDate.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
      <div>
        <label>衡量指标</label>
        <md-select ng-model="sendData.measureIndexCode">
          <md-option ng-value="item.measureIndexCode" style="width:250px;" ng-click="changeMeasureIndex(item.measureIndexCode)" ng-repeat="item in measureIndexs">{{item.measureIndexName}}</md-option>
        </md-select>
      </div>
      <div style="margin-top:15px;width:350px;" ng-show="sendData.measureIndexCode === 'h3004' || sendData.measureIndexCode === 'h3005' ||sendData.measureIndexCode === 'h3006'">
        <md-radio-group ng-model="sendData.changeTypeCode" class="md-primary" style="display:inline-block;">
          <md-radio-button value="1"  style="display: inline-block;">按科室统计</md-radio-button>
          <md-radio-button value="2"  style="display: inline-block;">按业务系统统计</md-radio-button>
        </md-radio-group>
      </div>
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="flag.arrow" ng-click="flag.state = false"></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="search(sendData)" class="md-fab md-primary md-hue-1" aria-label="Profile">
      <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;"  ng-show="!flag.state"></i>
      <i class="glyphicon glyphicon-search" ng-show="flag.state"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <switching-button flag="flag" export-url="{{formPrefix}}" export-value="outData"></switching-button>
    <div ng-show="flag.show === 'view'">
      <div id="doc" style="height:450px;"></div>
    </div>
    <div ng-show="flag.show === 'table'">
      <div class="table-detail" >
        <div class="t_r" style="overflow-x: scroll;">
          <table class="table table-bordered" style="min-width: 100%;max-width: none;table-layout: fixed;word-break:break-all;">
            <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{send.title}}</caption>
            <thead>
              <tr>
                <th width="120px;">时间</th>
                <th width="120px;" ng-repeat="itemTh in items.tableTh">{{itemTh}}</th>
              </tr>
            </thead>
            <tbody>
              <tr ng-repeat="item in arrs">
                <td>{{item.time}}</td>
                <td ng-if="send.measureIndexCode != 'h3007'" ng-repeat="ld in item.lineData" class="diffcount-td">
                  <div style="width:100%;">{{ld.percentage}}</div>
                </td>
                <td ng-if="send.measureIndexCode === 'h3007'" ng-repeat="ld in item.lineData" class="diffcount-td">
                  <div style="width:100%;">{{ld.filedNum}}</div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div>
    </div>
  </div>
</div>